package com.chinatelecom.ifree.business.util;

public class BaseResult {
	private int code;
	private String msg;
	/** 成功 */
	public final static BaseResult OPERATE_SUCCESS = new BaseResult(0, "成功");
	/** 文件名称不正确 */
	public final static BaseResult ORDER_FILE_FORMAT_ERROR = new BaseResult(1001, "文件名称不正确");

	/** 文件内容不可读 */
	public final static BaseResult ORDER_FILE_CONTENT_ERROR = new BaseResult(1002, "文件内容不可读");

	/** 文件大小超出可读范围 */
	public final static BaseResult ORDER_FILE_LENGTH_ERROR = new BaseResult(1003, "文件大小超出可读范围");

	/** 文件内容不能为空 */
	public final static BaseResult ORDER_FILE_EMPTY_ERROR = new BaseResult(1004, "文件内容不能为空");

	/** 读取文件内容失败 */
	public final static BaseResult ORDER_FILE_READ_ERROR = new BaseResult(1005, "读取文件内容失败");

	/** 保存处理文件日志失败 */
	public final static BaseResult ORDER_FILE_LOG_ERROR = new BaseResult(1006, "保存处理文件日志失败");

	/** 查询预约号码是否已存在失败 */
	public final static BaseResult ORDER_QUERY_MOBILE_ERROR = new BaseResult(1007, "查询预约号码是否已存在失败");

	/** 该号码已经预约 */
	public final static BaseResult ORDER_MOBILE_EXIST_ERROR = new BaseResult(1008, "该号码已经预约");

	/** 参数格式不对 */
	public final static BaseResult ORDER_MISS_PARAMETER_ERROR = new BaseResult(1009, "数据格式不正确");

	/** 预约失败 */
	public final static BaseResult ORDER_OCCUPY_FCODE_ERROR = new BaseResult(1010, "预约失败");

	/** 预约失败 */
	public final static BaseResult ORDER_QUERY_ORDER_ERROR = new BaseResult(1011, "查询预约信息失败");

	/** 预约失败 */
	public final static BaseResult ORDER_OCCUPY_EMPTY_ERROR = new BaseResult(1012, "该号码还没有预约信息");

	/** 手机号码不正确 */
	public final static BaseResult ORDER_MOBILE_FORMAT_ERROR = new BaseResult(1013, "手机号码不正确");

	/** 姓名格式不正确 */
	public final static BaseResult ORDER_NAME_FORMAT_ERROR = new BaseResult(1014, "姓名格式不正确");

	/** 图片验证码不能为空 */
	public final static BaseResult ORDER_IMG_EMPTY_ERROR = new BaseResult(1015, "图片验证码不能为空");

	/** 图片验证码不正确 */
	public final static BaseResult ORDER_IMG_INVALID_ERROR = new BaseResult(1016, "图片验证码不正确");

	/** 查询实时预约总数失败 */
	public final static BaseResult ORDER_QUERY_TOTAL_ERROR = new BaseResult(1017, "查询实时预约总数失败");

	/** 查询实时预约总数失败 */
	public final static BaseResult ORDER_QUERY_LIMIT_ERROR = new BaseResult(1018, "预约数量受限");
	// ---------------------------------------------------------------------------------------------------
	/** 投票报错 */
	public final static BaseResult VOTE_NOT_EXIST = new BaseResult(2001, "投票活动不存在");
	public final static BaseResult VOTE_ITEM_NOT_EXIST = new BaseResult(2002, "投票活动没有这个投票项");
	public final static BaseResult VOTE_FREQUENCE_LIMIT = new BaseResult(2003, "投票频率限制");
	public final static BaseResult VOTE_FAIL = new BaseResult(2004, "投票失败，请稍后重试");
	public final static BaseResult VOTE_DUPLICATE = new BaseResult(2005, "请不要重复投票");
	// ---------------------------------------------------------------------------------------------------
	public final static BaseResult LOGIN_RANDOM_FETCH_ERROR = new BaseResult(3000, "获取随机码失败");
	public final static BaseResult LOGIN_RANDOM_OPERATOR_ERROR = new BaseResult(3001, "获取随机码失败");
	public final static BaseResult LOGIN_MOBILE_FORMAT_ERROR = new BaseResult(3002, "手机号码格式不正确");
	/** UATicket鉴定失败 */
	public final static BaseResult LOGIN_UAMTICKET_VALIDATA_ERROR = new BaseResult(3003, "UATicket鉴定失败");
	/** UATicket数字签名失败 */
	public final static BaseResult LOGIN_UAMTICKET_SIGN_ERROR = new BaseResult(3004, "UATicket数字签名失败");
	/** 获取断言信息失败 */
	public final static BaseResult LOGIN_ASSERTION_FETCH_ERROR = new BaseResult(3005, "获取断言信息失败");
	/** 数字签名不匹配 */
	public final static BaseResult LOGIN_UAMTICKET_UNMATCH_ERROR = new BaseResult(3006, "数字签名不匹配");
	/** 不是ifree卡用户 */
	public final static BaseResult LOGIN_NOT_IFREE_ERROR = new BaseResult(3007, "您不是ifree卡用户");
	/** 存储图片验证码入库失败 */
	public final static BaseResult LOGIN_STORE_IMAGE_ERROR = new BaseResult(3008, "存储图片验证码入库失败");
	/** 从库中获取图片验证码失败 */
	public final static BaseResult LOGIN_FETCH_IMAGE_ERROR = new BaseResult(3009, "从库中获取图片验证码失败");
	/** 要查询的图片验证码不存在 */
	public final static BaseResult LOGIN_NOTEXIST_IMAGE_ERROR = new BaseResult(3010, "要查询的图片验证码不存在");
	/** UUID不能为空值 */
	public final static BaseResult LOGIN_UUID_EMPTY_ERROR = new BaseResult(3011, "UUID不能为空值");
	/** 缓存KEY不存在 */
	public final static BaseResult LOGIN_UUID_NOTEXIST_ERROR = new BaseResult(3012, "缓存KEY不存在");
	/** 从缓存中获取图片验证码失败 */
	public final static BaseResult LOGIN_UUID_FETCH_ERROR = new BaseResult(3013, "从缓存中获取图片验证码失败");
	// ---------------------------------------------------------------------------------------------------
	public final static BaseResult BILLING_QUERY_FAILED = new BaseResult(4001, "系统正忙，请稍后再试！");
	public final static BaseResult CRM_QUERY_FAILED = new BaseResult(4002, "系统正忙，请稍后再试！");
	public final static BaseResult BILLING_BUSINESS_FAILED = new BaseResult(4003, "系统正忙，请稍后再试！");
	public final static BaseResult CRM_BUSINESS_FAILED = new BaseResult(4004, "系统正忙，请稍后再试！");
	public final static BaseResult PARAM_REQUIED = new BaseResult(4005, "系统正忙，请稍后再试！");
	
	public final static BaseResult CRM_BUSINESS_PAUSED = new BaseResult(4006, "月末最后一天17:30以后停止业务受理！");
	
	
	// ---------------------------------------------------------------------------------------------------
	/** 报表查询失败 */
	public final static BaseResult REPORT_QUERY_QUERY_ERROR = new BaseResult(5000, "报表查询失败");

	/** 查询区间内总数失败 */
	public final static BaseResult REPORT_QUERY_SECTION_ERROR = new BaseResult(5001, "查询区间内总数失败");

	/** 页码不正确 */
	public final static BaseResult REPORT_QUERY_PAGE_ERROR = new BaseResult(5002, "页码不正确");

	/** 时间格式不正确 */
	public final static BaseResult REPORT_TIME_FORMAT_ERROR = new BaseResult(5003, "时间格式不正确");
	// -------------------------------------------------------------------------------------------------------------
	/** 查询系统配置失败 */
	public final static BaseResult SYSTEM_QUERY_CONFIG_ERROR = new BaseResult(9000, "查询系统配置失败");

	/** 设置系统配置失败 */
	public final static BaseResult SYSTEM_SETTING_CONFIG_ERROR = new BaseResult(9001, "设置系统配置失败");

	// --------------------------------------------------------------------------------------

	public BaseResult() {
	}

	public BaseResult(int code, String msg) {
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	@Override
	public String toString() {
		return this.getClass().getName() + "[code=" + code + ", msg=" + msg + "]";
	}
}
